package model;

import java.util.List;

public class Item {
    private String id;     // 商品ID
    private String name;   // 名称
    private double price;  // 价格
    private ItemType type; // 类型

    // 商品类型枚举
    public enum ItemType {
        MAIN,   // 主食（汉堡、薯条）
        DRINK,  // 饮料
        DESSERT // 甜品
    }

    public Item(String id, String name, double price, ItemType type) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.type = type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    @Override
    public String toString() {
        return "Item{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", type=" + type +
                '}';
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public ItemType getType() {
        return type;
    }

    public void setType(ItemType type) {
        this.type = type;
    }
}